<?php
class Items extends MY_Controller{
	
	var $folder = "admin";
	function __construct(){
		parent::__construct();
		$this->load->model($this->folder.'/Item_model' , 'mItem' ,TRUE);
		$this->mainmodel = $this->mItem;
		$this->postConstructor();
	}
	
	function saveview($id){
		$this->edit($id);
	}
	
	function loadCustomReferenceData($data = array()){
		$this->load->model($this->folder.'/Item_view_model' , 'mItemView' ,TRUE);
		if(isset($data['ID']))
		 	$data['item_view_list'] = $this->mItemView->mainListWithPaginationByField('item_id' , $data['ID']);
		// echo "COOOUNTTTT ::: " .count($data['item_view_list']);
		 return $data;
	}
	

}
?>